/** @file               sw_swallow.h
 *  @copyright          Copyright (C) 2006-2026 flyfish (tenggui_fu@126.com)
 *  @brief              This file is part of the swallow library
 *  @author             $Author: Thinkpad $
 *  @version            $Rev: 535 $
 *  @date               $Date: 2017-03-20 15:03:25 +0800 (周一, 20 3月 2017) $
 */
#ifndef __SW_SWALLOW_H__
#define __SW_SWALLOW_H__

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <stdint.h>
#include <stdarg.h>
#include <errno.h>
#include <ctype.h>
#include <signal.h>
#ifdef WIN32
#include <windows.h>
#endif
#include "sw_config.h"
#include "sw_const.h"
#include "sw_type.h"

#ifndef SW_V_DISABLE_MEM
#include "sw_mem.h"
#endif

#ifndef SW_V_DISABLE_ERRNO
#include "sw_errno.h"
#endif

#ifndef SW_V_DISABLE_CHARSET
#include "sw_charset.h"
#endif

#ifndef SW_V_DISABLE_UTIL
#include "sw_util.h"
#endif

#ifndef SW_V_DISABLE_DEBUG
#include "sw_debug.h"
#endif

#ifndef SW_V_DISABLE_LIST
#include "sw_list.h"
#endif

#ifndef SW_V_DISABLE_TIME
#include "sw_time.h"
#endif

#ifndef SW_V_DISABLE_MUTEX
#include "sw_mutex.h"
#endif

#ifndef SW_V_DISABLE_RWLOCK
#include "sw_rwlock.h"
#endif

#ifndef SW_V_DISABLE_MQUEUE
#include "sw_mqueue.h"
#endif

#ifndef SW_V_DISABLE_THREAD
#include "sw_thread.h"
#endif

#ifndef SW_V_DISABLE_SIGNAL
#include "sw_signal.h"
#endif

#ifndef SW_V_DISABLE_FILE
#include "sw_file.h"
#endif

#ifndef SW_V_DISABLE_SERIAL
#include "sw_serial.h"
#endif

#ifndef SW_V_DISABLE_CURVE
#include "sw_curve.h"
#endif

#ifndef SW_V_DISABLE_INI
#include "sw_ini.h"
#endif

#ifndef SW_V_DISABLE_SOCKET
#include "sw_socket.h"
#endif

#ifndef SW_V_DISABLE_LSOCKET
#include "sw_lsocket.h"
#endif

#ifndef SW_V_DISABLE_MODULE
#include "sw_module.h"
#endif

#ifndef SW_V_DISABLE_CMDSERVER
#include "sw_cmdserver.h"
#endif

#ifndef SW_V_DISABLE_DEVICE
#include "sw_device.h"
#endif

#ifndef SW_V_DISABLE_COND
#include "sw_cond.h"
#endif

#ifndef SW_V_DISABLE_RBUF
#include "sw_rbuf.h"
#endif

#ifndef SW_V_DISABLE_TBUF
#include "sw_tbuf.h"
#endif

#ifndef SW_V_DISABLE_MATH
#include "sw_math.h"
#endif

#ifndef SW_V_DISABLE_IMAGE
#include "sw_image.h"
#endif

#ifndef SW_V_DISABLE_FONT
#include "sw_font.h"
#endif

#ifndef SW_V_DISABLE_TUI
#include "sw_tui.h"
#endif

#ifndef SW_V_DISABLE_SEM
#include "sw_sem.h"
#endif

#ifndef SW_V_DISABLE_JSON
#include "sw_json.h"
#endif

#ifndef SW_V_DISABLE_CFGM
#include "sw_cfgm.h"
#endif

#ifndef SW_V_DISABLE_OSD
#include "sw_osd.h"
#endif

#ifndef SW_V_DISABLE_DIR
#include "sw_dir.h"
#endif

#ifndef SW_V_DISABLE_DLL
#include "sw_dll.h"
#endif

#ifndef SW_V_DISABLE_SQLITE
#include "sw_sqlite.h"
#endif

#ifndef SW_V_DISABLE_COMPRESS
#include "sw_compress.h"
#endif

#ifndef SW_V_DISABLE_MSGQ
#include "sw_msgq.h"
#endif

#ifndef SW_V_DISABLE_MBX
#include "sw_mbx.h"
#endif

#ifndef SW_V_DISABLE_TIMER
#include "sw_timer.h"
#endif

#ifndef SW_V_DISABLE_THREADPOOL
#include "sw_threadpool.h"
#endif

#ifndef SW_V_DISABLE_LIST2
#include "sw_list2.h"
#endif

#ifndef SW_V_DISABLE_LIST2
#include "sw_tls.h"
#endif

#ifndef SW_V_DISABLE_CRYPT
#include "sw_crypt.h"
#endif

#ifdef __cplusplus
extern "C" {
#endif

#define SW_GET_BUILD_DATETIME(dt)       SW_GetBuildDateTime(dt, __DATE__, __TIME__)

typedef enum _SW_API_MODULE
{
    SW_APIM_CFGM,
    SW_APIM_CHARSET,
    SW_APIM_CMDSERVER,
    SW_APIM_COMPRESS,
    SW_APIM_COND,
    SW_APIM_CURVE,
    SW_APIM_DEBUG,
    SW_APIM_DEVICE,
    SW_APIM_DIR,
    SW_APIM_DLL,
    SW_APIM_ERRNO,
    SW_APIM_FILE,
    SW_APIM_FONT,
    SW_APIM_IMAGE,
    SW_APIM_INI,
    SW_APIM_JSON,
    SW_APIM_LIST,
    SW_APIM_LIST2,
    SW_APIM_LSOCKET,
    SW_APIM_MATH,
    SW_APIM_MBX,
    SW_APIM_MEM,
    SW_APIM_MODULE,
    SW_APIM_MQUEUE,
    SW_APIM_MSGQ,
    SW_APIM_MUTEX,
    SW_APIM_OSD,
    SW_APIM_RBUF,
    SW_APIM_RWLOCK,
    SW_APIM_SEM,
    SW_APIM_SERIAL,
    SW_APIM_SIGNAL,
    SW_APIM_SOCKET,
    SW_APIM_SQLITE,
    SW_APIM_TBUF,
    SW_APIM_THREAD,
    SW_APIM_THREADPOOL,
    SW_APIM_TIME,
    SW_APIM_TIMER,
    SW_APIM_TUI,
    SW_APIM_UTIL,
    SW_APIM_TLS,
    SW_APIM_CRYPT,
    SW_APIM_NUM
}SW_API_MODULE;

SW_API SW_RET SW_Init(SW_VOID);
SW_API SW_RET SW_Run(SW_VOID);
SW_API SW_RET SW_Stop(SW_VOID);
SW_API SW_RET SW_Exit(SW_VOID);
SW_API SW_RET SW_InitRun(SW_VOID);
SW_API SW_RET SW_StopExit(SW_VOID);
SW_API SW_RET SW_EnableAPIModule(SW_API_MODULE module, SW_BOOL enable);
SW_API SW_BOOL SW_IsAPIModuleEnabled(SW_API_MODULE module);
SW_API const SW_CHAR *SW_GetLibName(SW_VOID);
SW_API SW_UINT32 SW_GetMajorVersion(SW_VOID);
SW_API SW_UINT32 SW_GetMinorVersion(SW_VOID);
SW_API SW_UINT32 SW_GetPatchVersion(SW_VOID);
SW_API SW_UINT32 SW_GetBuildVersion(SW_VOID);
SW_API SW_RET SW_GetBuildDateTime(SW_DATETIME *pDateTime, const SW_CHAR *pDateStr, const SW_CHAR *pTimeStr);

#ifdef __cplusplus
}
#endif

#endif

